package garbage;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;

@PersistenceCapable
public class Utilisateur {

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key id;
	
	 @Persistent
	 private User adressMail;
	
	 @Persistent
	private String nom, prenom;
	 
	 @Persistent
	 private String[] adresses;
	
	public Utilisateur(User user, String nom, String prenom){
		this.adressMail = user;
		this.nom = nom;
		this.prenom = prenom;
	}
	
	public Key getId() {
        return id;
    }
	
	public String getNom(){
		return this.nom;
	}
	
	public void setNom(String nom){
		this.nom = nom;
	}
	
	public String getPrenom(){
		return this.prenom;
	}
	
	public void setPrenom(String prenom){
		this.prenom = prenom;
	}

	
	public User getAdressMail() {
		return adressMail;
	}

	
	public void setAdressMail(User adressMail) {
		this.adressMail = adressMail;
	}

	
	public void setId(Key id) {
		this.id = id;
	}
	
	public void addAdresse(String adresse){
		this.adresses[this.adresses.length] = adresse;
	}
	
}
